﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example11.aspx.cs" Inherits="Chapter18.Example11" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 18-11 使用 :valid 和 :invalid 选择器</title>
    <style type="text/css">
        :invalid {
            outline: thin solid red;
        }

        :valid {
            outline: thin solid green;
        }
    </style>
</head>
<body>
    <form method="post" action="http://titan:8080/form">
        <p>
            <label for="name">Name:<input required="required" name="name" id="name" /></label>
        </p>
        <p>
            <label for="name">City:<input required="required" name="city" id="city" /></label>
        </p>
        <button type="submit">Submit Vote</button>
    </form>
</body>
</html>
